import request from '@/utils/request'

//获取新闻分类列表
export function getCategoryList() {
    return request({
        url: "/category",
        method: 'get',
    })
}
//根据id删除新闻分类
export function deleteCategory(id) {
    return request({
        url: "/category/" + id,
        method: 'delete',
    })
}
//添加和修改新闻分类
export function addOrUpdateCategory(category) {
    return request({
        url: "/category",
        method: 'post',
        data: category
    })
}
